using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace QuanLySim.DAO
{
    class clsDangNhapDAO
    {
        #region "variable"
        private string m_Erorr;
        private clsCommand m_clsCommand;
        #endregion

        #region "property"
        public string ERORR
        {
            get { return m_Erorr; }
            set { m_Erorr = value; }
        }
        #endregion

        #region "method"
        public clsDangNhapDAO()
        {
            m_clsCommand = new clsCommand();
        }

        public DataTable DangNhap()
        {
            DataTable table = new DataTable();
            string strSelect = "SELECT TENDANGNHAP, MATKHAU FROM QUANLY";
            if (m_clsCommand.Connect())
            {
                table = m_clsCommand.Select(strSelect);
                m_clsCommand.CloseConnect();
                return table;
            }
            m_Erorr = m_clsCommand.ERORR;
            return null;
        }
        #endregion
    }
}
